package com.artconcurrency.chapter7;

import java.util.concurrent.atomic.AtomicInteger;

/**
 * @ClassName com.artconcurrency.chapter7
 * Description: <类功能描述>. <br>
 * <p>
 * <使用说明>
 * </p>
 * @Author tree
 * @Date 2019-05-03 15:40
 * @Version 1.0
 */
public class AtomicIntegerTest {
    static AtomicInteger ai = new AtomicInteger(1);
    public static void main(String[] args) {
        System.out.println(ai.getAndIncrement());
        System.out.println(ai.get());
        System.out.println(ai.incrementAndGet());
        System.out.println(ai.get());
    }
}
